Log In  
BBS > Lexaloffle Community Superblog
This is a combined feed of all Lexaloffle user blogs. For Lexaloffle-related news, see @zep's blog.

All | Following | PICO-8 | Voxatron | General | Off-site
[ :: Read More :: ]

Hi y'all! I can't seem to access the code text snippets of any of the cart posts atm. Was there a recent update to the forums that changed this? Just curious, since I learn a lot from seeing how others put things together. Thanks!

P#59409 2018-11-28 03:24 ( Edited 2018-11-28 14:38)
[ :: Read More :: ]

Hi,
I would like to add a basic 3d outside view to my flight sim project Tiny Sim. For this I started with the code below, which is just showing a simplified runway (essentially, a rectangle with some points). I am trying to get the projection function right and while it works for z<0 it fails miserably for z>=0: the runway is somehow mirrored in the upper half of the screen.

rwy = {{{-1,0,0}, --points
        {-1,0,30},
        {1,0,30},
        {1,0,0}},
       {{1,2}, --lines
        {2,3},
        {3,4},
        {4,1}},
         4}

cam = {0,1,-4}
mult = 64
sp = 0.01

function _update()
  if btn(0) then cam[1] -= 0.1 end
  if btn(1) then cam[1] += 0.1 end
  if btn(2) then cam[2] += 0.1 end
  if btn(3) then cam[2] -= 0.1 end
  if(cam[2]<0) cam[2]=0
  if btn(4) then cam[3] -= 0.1 end
  if btn(5) then cam[3] += 0.1 end
end

function _draw()
  cls()
  print("x="..cam[1],0,6*1)
  print("y="..cam[2],0,6*2) 
  print("z="..cam[3],0,6*3) 

  draw_shape(rwy)
  for i=1, 14 do
    draw_point({0,0,i*2},7)
  end
  draw_point({-0.5,0,2},7)
  draw_point({0.5,0,2},7)
end

function draw_shape(s,c)
  for l in all(s[2]) do
    draw_line(s[1][l[1]], s[1][l[2]], c)
  end
end

function draw_line(p1,p2,c)
  x0, y0 = project(p1)
  x1, y1 = project(p2)
  line(x0, y0, x1, y1, c or 6)
end

function draw_point(p,c)
  x, y = project(p)
  pset(x, y, c or 11)
end

function project(p)
  x = (p[1]-cam[1])*mult/(p[3]-cam[3]) + 127/2
  y = -(p[2]-cam[2])*mult/(p[3]-cam[3]) + 127/2  
  return x, y
end

--functions for roll, pitch and yaw

Runway being displayed correctly (z<0):

Runway with wrong projection (z>=0):

I split up the projection function for z<0 and z>=0 but did not find the right formula for z>=0 yet:

function project(p)
  if cam[3]<=0 then
    x = (p[1]-cam[1])*mult/(p[3]-cam[3]) + 127/2
    y = -(p[2]-cam[2])*mult/(p[3]-cam[3]) + 127/2
  else
    x = (p[1]+cam[1])*mult/(p[3]+cam[3]) + 127/2
    y = -(p[2]+cam[2])*mult/(p[3]+cam[3]) + 127/2
  end  
  return x, y
end

Any help is much appreciated!

P#59388 2018-11-27 14:46
[ :: Read More :: ]

Cart #59384 | 2018-11-27 | Code ▽ | Embed ▽ | No License
1

P#59385 2018-11-27 05:16 ( Edited 2018-12-02 07:52)
[ :: Read More :: ]

v0.2 UPDATE:

  • Respawning after you die
  • Levels of increasing difficulty
  • Asteroids break up into smaller chunks when hit

Cart #porapubene-0 | 2018-11-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

v0.1:

Hello!

Over thanksgiving weekend I took a swing at PICO-8 to introduce my nephew to some game programming. What a delightful little platform! (other than the scoping rules of Lua, ugh!).

The result was a very simple Asteroids clone. Enjoy! https://github.com/pepaslabs/picoroids

The asteroids don't break up into smaller pieces yet, and there is no score or sound effects. Work-in-progress!

Also, I have four days of Lua under my belt, so the code probably isn't idiomatic. Now that I've read a bit of other people's code, I realized I should have used my tables as dictionaries, rather than always accessing them as arrays (the code is more difficult to read).

Cheers!

Cart #59373 | 2018-11-27 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

P#59375 2018-11-27 02:16 ( Edited 2018-11-28 07:45)
[ :: Read More :: ]

Cart #biyakigaha-0 | 2018-12-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
26

Day 1 of the 2018 Pico-8 Advent Calendar!


Thanks for checking out my entry for our community "Pico-8 Advent Calendar"!

It's a simple "race the clock" arcade game, with the goal of delivering as many presents as possible before sunrise. The entire game only lasts about a minute, with the idea that you will play many times, and try to beat your previous high score.

Credits:

Design and Code: https://twitter.com/matthughson
Art: https://twitter.com/hoybhoyb
Sound and Music: https://twitter.com/gruber_music
3D FX and Intro: https://twitter.com/2DArray

About Pico-8 Advent Calender:

During December, each day will be filled with new and exciting PICO-8 games! We have gathered 25 great developers from the PICO-8 community and we have worked hard to make some new games. Each day leading up to Christmas, there will be a new surprise for you!

Find out more at: https://pico8-advent.tumblr.com/

And check out the Pico-8 Advent Calendar each day for a new suprise: https://www.lexaloffle.com/bbs/?tid=32388

P#59372 2018-11-26 23:38 ( Edited 2018-12-01 18:12)
[ :: Read More :: ]

Cart #jijazenefe-2 | 2020-11-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
155

EDIT: Updated version now supports mouse controls (and touch controls, but it won't work too well on the BBS - try the itch.io version to play on your phone!)

You're baking cakes for the Winter holidays! You do this by putting ingredients into a tray and trying to score the most points by assembling the longest combos possible!

This is an entry in the 2018 PICO-8 Advent Calendar - day #10.

How to play
The easiest way to learn is the "how to play" option in-game, but here is the gist:

  • You make cakes by playing tiles into the tray. When the tray fills up, the cake is baked and scored.
  • You get a recipe for each cake. The total score on tiles with a given ingredient has to at least match the number in the top-left corner.
  • Tiles with the same ingredients fuse together when placed next to each other.
  • Tiles with different ingredients interact through links. There are colored knobs on the sides of tiles. A red knob means that a tile will link with a red tile in this direction (the color of the score tag matters). Tiles earn bonus points when linked (equal to the lowest score already on them) and swap places.
  • You can use all that swapping to make combos, which score extra points to all the tiles in your tray.
  • Every link or fuse that you make earns you an extra tile to use.
P#59366 2018-11-26 16:24 ( Edited 2020-11-28 18:59)
[ :: Read More :: ]

Cart #59363 | 2018-11-26 | Code ▽ | Embed ▽ | No License

P#59364 2018-11-26 15:57 ( Edited 2018-11-26 20:57)
[ :: Read More :: ]

Cart #59360 | 2018-11-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3


I still remember how fun it was playing this game on the ZX Spectrum. I had a very same fun while demaking it in PICO-8. It took couple of hours and here it is :)

P#59361 2018-11-26 15:50 ( Edited 2018-11-27 04:12)
[ :: Read More :: ]

Cart #59357 | 2018-11-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

You've heard of Go, the classic board game with two players, but what about Mega Go?!

Here are the standard rules of Go:

  • Players take turns placing tokens on the board
  • If a group of one color is completely surrounded, all the tokens in it are removed
  • A move is illegal if it would result in the previous board position being matched (Ko)

The version shown here uses the following variant on the rules:

  • The board is, like, huge
  • There are ten players instead of two
  • no Ko rule, 'cause I'm too lazy to implement it and it's very unlikely to ever happen

The ten CPU players take turns playing onto random empty spaces on the board. The version shown here partitions the board into 36 smaller 19*19 boards (plus some extra on the edges).

Feel free to experiment with the parameters on the first tab to try different board configurations or different numbers of players. I found an odd phenomenon where, on a blank 128*128 board with two players, the second player would almost always end up filling the board. See what other interesting things you can find!

P#59358 2018-11-26 12:06 ( Edited 2018-11-26 17:06)
[ :: Read More :: ]

Cart #59344 | 2018-11-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
20

Just my first demo with some simple effects, hope you like it! The music sync can get a bit off if you're not focused on the page. Lots to learn and the BBS has been a big help, wanna tackle some more 3d effects next time!

Release date: 2018-11-26
Code+Gfx+Music: Pixienop

P#59345 2018-11-25 17:49 ( Edited 2018-11-25 22:54)
[ :: Read More :: ]

Cart #59339 | 2018-11-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2


First Game Created

P#59340 2018-11-25 14:13 ( Edited 2018-11-27 02:29)
[ :: Read More :: ]

Cart #59336 | 2018-11-25 | Code ▽ | Embed ▽ | No License
9

Cart #59324 | 2018-11-25 | Code ▽ | Embed ▽ | No License
9

Cart #59319 | 2018-11-24 | Code ▽ | Embed ▽ | No License
9

Leave behind everyday life, and enter a relaxing, all-inclusive golf experience with randomly-generated levels and course conditions. Welcome to PicoPutt.

Controls:
Arrow Keys: Select angle.
Z: Begin shot. Press Z again to shoot.

P#59320 2018-11-24 18:16 ( Edited 2018-11-25 23:50)
[ :: Read More :: ]

by a2
Cart #59310 | 2018-11-24 | Code ▽ | Embed ▽ | No License
7

Looking for feedback on my first real PICO-8 game. I have some background music (inspired by Jaws) and a lovely shark sprite-set + some little fishies. The shark chomps with the Z-button. Otherwise no other functionality is implemented yet.

P#59311 2018-11-24 12:57 ( Edited 2018-11-27 15:27)
[ :: Read More :: ]

Cart #decorama-0 | 2018-12-12 | Code ▽ | Embed ▽ | No License
7

~ Day 13 of the PICO-8 Advent Calendar ~

A festive aesthetic experience for 1-2 friends
Featuring art from the inimitable Lia Snyderman

Make a cool tree. Pet the cat. Chill. Enjoy the season.

RIGHT HAND:
arrow keys to move
X to pull ornaments out of the box or pick them up
Z to gently let go

LEFT HAND:
SFED to move
<shift> to pet cat

MENU:
<enter>

P#59309 2018-11-24 11:23 ( Edited 2018-12-13 00:04)
[ :: Read More :: ]

Cart #secretsanta-0 | 2018-12-20 | Code ▽ | Embed ▽ | No License
91

"In today's world of modern home security, Santa's job of delivering presents gets tougher every year!"

Created as part of PICO8 Advent Calendar 2018, organised by @Bigaston.

Features

  • Six "Christmas Movie"-themed houses
    • (inc. the BIGGEST building from a Christmas movie!)
  • Four secret tools for assisting in modern-day present deliveries
    • Many security obstacles, including:
    • Motion-sentitive cameras!
    • Laser trip wires!
    • Pressure floor pads!
    • Guard dogs!
    • Sensitive sound monitor - remember to keep quiet!
  • Records your best times - per-level + overall

Mission / Controls

Credits & Thanks

Additional code snippets that I used/adapted:

PICO-8 Advent Calendar

This game was created for the PICO-8 Advent Calendar. Everyday during the month of December, you can play a new free game created with PICO-8.

RELEASE HISTORY:

  • v1.0:
    • Initial version
P#59306 2018-11-24 09:55 ( Edited 2018-12-21 08:03)
[ :: Read More :: ]

Cart #santapanic-0 | 2018-12-08 | Code ▽ | Embed ▽ | No License
13

Santa Panic! A gift wrapping arcade game for 1 or 2 players, by dddaaannn and TimSwast. This is game 9 of the PICO-8 Advent calendar 2018.

Get those presents wrapped and in the right spots, and get yourself back up the chimney, before you're found out!

  • Directional pad to move.
  • "O" button to pick up, then "O" again while not moving to drop, or while moving to throw.
  • Wrap a present by walking it to a wrapping station.
  • Pick up your sack and walk into the chimney to leave.

Two player co-op available! You could use the help, but make sure both of you get to the chimney in time!

P#59302 2018-11-23 22:10 ( Edited 2018-12-08 23:54)
[ :: Read More :: ]

ClockworkPi is having a "Black Friday" sale on GameShells, only $119 (40% off) today only!

https://www.clockworkpi.com/

This is the new version of the GameShell with more memory and microHDMI out. It runs Pico-8 and is my favorite Pico-8-capable handheld to date.

I am not affiliated with ClockworkPi, I'm just passing along the info. Enjoy!

P#59299 2018-11-23 12:20 ( Edited 2018-11-23 17:20)
[ :: Read More :: ]

Cart #59287 | 2018-11-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

A very simple game I've been making on the train to and from work.

Follow my dumbass for more goodies @ctinney94

P#59288 2018-11-22 15:08 ( Edited 2018-11-25 21:57)
[ :: Read More :: ]

A competitive puzzle game, inspired by Yoshi's Cookie, with magic spells and a Smash Bros.-like percentage system where the last one standing on the platform wins!

Cart #puzzlecoven-2 | 2018-12-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
15

Future iterations may include adjustable AI difficulty, selectable characters with different spells, and some snazzier visual effects.

Update v0.91: by request, added "slip cursor" movement style using (X).

Update v0.9: board-filling code is more diligent and now cannot generate spontaneous matches. Vertical matches are now checked first for possibly historical reasons.

(Character sprite based on Oddball's 8x8 sprites; title/countdown font is Alagard by Hewett Tsoi.)

P#59284 2018-11-22 13:18 ( Edited 2018-12-04 10:32)
[ :: Read More :: ]

Cart #59279 | 2018-11-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#59280 2018-11-22 02:10 ( Edited 2018-11-22 07:10)
View Older Posts